export default {
  //检查时间是否过期
  convertAndCheckExpiry(dateString) {
    // 判断日期是否过期
    let now = new Date();
    let endTime = new Date(dateString).getTime()
    let isExpired = now > endTime;

    return isExpired
  },
  convertDateFormat(dateString) {
    let date = new Date(dateString.replace(' ', 'T'));
    let isoString = date.toISOString();
    let convertedDate = isoString.slice(0, 19);
    return convertedDate;
  }
}